package com.example.Annocation.Autowire;

import com.example.Annocation.commons.BookService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Description TODO
 * @Date 2024/5/14 19:53
 * @Created by houjunfeng
 */
public class AutoWiredTest {
    @Test
    public void getScope(){
        //测试范围
        ApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(AutowireConfigeration.class);
        BookService bookservice = annotationConfigApplicationContext.getBean(BookService.class);
        System.out.println(bookservice);
    }
}
